using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using XGame.ConfigData;
namespace XGame.UI
{
    public class UIPlaneBasic : MonoBehaviour
    {
        private UIConfigData m_ConfigData;

        private Transform m_Trans;

        public virtual void OnShow(){}
        
        public virtual void OnTick(float delta){}

        public virtual void OnHide(){}

        public virtual void OnDestroy(){}


        private void SetDepth()
        {
            Canvas canvas = m_Trans.GetComponent<Canvas>();
            if(canvas)
            {
                canvas.overrideSorting = true;
                canvas.sortingLayerID = SortingLayer.layers[m_ConfigData.m_SortingLayer].id;
                canvas.sortingOrder = m_ConfigData.m_Depth;
            }

        }
    }
}

